<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %> 
<script type="text/javascript">
function client_qy_o_change_province()
{
    var url = "qy/order/p2/changeprovince.do";
    var content = "province1=" + dijit.byId("province").get('value');
    var objectid = "qy_region";
    sendXMLHttpRequest(url, content, objectid); 
}

function client_qy_o_change_channel()
{
    var url = "qy/order/p2/changechannel.do";
    var content = "channelId=" + dijit.byId("channel").get('value');
    var objectid = "qy_projects";
    sendXMLHttpRequest(url, content, objectid); 
}

function client_qy_o_change_sp()
{
    var url = "qy/order/p2/changesp.do";
    var content = "spId1=" + dijit.byId("spid").get('value');
    var objectid = "qy_spcodes";
    sendXMLHttpRequest(url, content, objectid); 
}

function client_qy_o_change_cp()
{
    var url = "qy/order/p2/changecp.do";
    var content = "cpId1=" + dijit.byId("cpid").get('value');
    var objectid = "qy_cpappinfo_div";
    sendXMLHttpRequest(url, content, objectid); 
}

function client_qy_o_pay_data()
{
	var url      = "qy/order/p2/data.do";
    var content  = "dimension=" + get_query_dimension(15)
                 + "&date1=" + document.getElementById("date1").value
                 + "&date2=" + document.getElementById("date2").value
                 + "&channelId=" + dijit.byId("channel").get('value')
                 + "&projectId=" + dijit.byId("project").get('value')
                 + "&province1=" + dijit.byId("province").get('value')
                 + "&region1=" + dijit.byId("region").get('value')
                 + "&spId1=" + dijit.byId("spid").get('value')
                 + "&spCodeId1=" + dijit.byId("spcode").get('value')
                  + "&cpId=" + dijit.byId("cpid").get('value')
                   + "&appnumber=" + dijit.byId("appinfos").get('value');
    var objectid = "qy_data";
    sendXMLHttpRequest(url, content, objectid);
}

</script>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td height="25" class="t1"><img src="images/small0.gif" width="14" height="12" /> 您现在的位置&gt;&gt;订单统计</td>
      </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="6">
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right"><img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="25" colspan="6" class="table_blue">　<strong><img src="images/dot.jpg" width="13" height="9">统计条件</strong></td>
      </tr>    
      <tr>
      <td height="25" class="table_w1" align="center" width="10%">开始日期：</td>
        <td class="table_w2" width="20%">&nbsp;
          <input type="text" id="date1" name="date1" dojoType="dijit.form.DateTextBox" style="width:135px;"
             value="<s:property value="date1" />" constraints="{datePattern:'yyyy-MM-dd'}" />   
        </td>
        <td class="table_w2" align="center" width="10%">结束日期：</td>
        <td class="table_w2" width="20%">&nbsp;
          <input type="text" id="date2" name="date2" dojoType="dijit.form.DateTextBox" style="width:135px;"
             value="<s:property value="date2" />" constraints="{datePattern:'yyyy-MM-dd'}" />      
        </td>
         <td class="table_w2" rowspan="3" colspan="2" align="left">
         &nbsp;&nbsp;
          <input id="dimension[0]" dojoType="dijit.form.CheckBox" value="day" checked ><label for="dimension[0]">日&nbsp;&nbsp;&nbsp;&nbsp;期</label>
          <input id="dimension[1]" dojoType="dijit.form.CheckBox" value="hour"><label for="dimension[1]">小&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;时</label>
          <input id="dimension[2]" dojoType="dijit.form.CheckBox" value="minute"><label for="dimension[2]">分钟</label>
          <br>&nbsp;&nbsp;
          <input id="dimension[3]" dojoType="dijit.form.CheckBox" value="carrier"><label for="dimension[3]">运营商</label>
          <input id="dimension[4]" dojoType="dijit.form.CheckBox" value="codetype"><label for="dimension[4]">代码类型</label>
          <input id="dimension[5]" dojoType="dijit.form.CheckBox" value="spid"><label for="dimension[5]">通道</label>
          <input id="dimension[6]" dojoType="dijit.form.CheckBox" value="spcodeid"><label for="dimension[6]">代码</label>
          <br>&nbsp;&nbsp;
          <input id="dimension[7]" dojoType="dijit.form.CheckBox" value="channel"><label for="dimension[7]">渠&nbsp;&nbsp;&nbsp;&nbsp;道</label>
          <input id="dimension[8]" dojoType="dijit.form.CheckBox" value="project"><label for="dimension[8]">项&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;目</label>
          <input id="dimension[9]" dojoType="dijit.form.CheckBox" value="province"><label for="dimension[9]">省份</label>
          <input id="dimension[10]" dojoType="dijit.form.CheckBox" value="region"><label for="dimension[10]">地区</label>
          <br>&nbsp;&nbsp;
          <input id="dimension[11]" dojoType="dijit.form.CheckBox" value="cpid"><label for="dimension[11]">C&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;P&nbsp;</label>
          <input id="dimension[12]" dojoType="dijit.form.CheckBox" value="appid"><label for="dimension[12]">应&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用</label>
          <input id="dimension[13]" dojoType="dijit.form.CheckBox" value="goodscode"><label for="dimension[13]">商品</label>
          <input id="dimension[14]" dojoType="dijit.form.CheckBox" value="chid"><label for="dimension[14]">CHID</label>
          <br>&nbsp;&nbsp;
          <button id="btn1" dojoType="dijit.form.Button" 
             onClick="client_qy_o_pay_data();" iconClass="plusIcon">查询</button></td>
      </tr>
      <tr>
         <td class="table_w1" align="center" width="10%">渠道信息：</td>
         <td class="table_w2" height="<s:property value="(channels.size()>1?2:1)*25"/>" width="17%"><div>&nbsp;
             <select id="channel" dojoType="dijit.form.FilteringSelect" style="width:135px;" onchange="qy_change_channel();">
               <option value="-1">全部</option>
               <s:iterator value="channels" status="stat">
               <option value="<s:property value="id" />" ><s:property value="name" /></option>
               </s:iterator>
             </select></div>
             <div id="qy_projects"><s:include value="_changechannel.jsp"/></div>
         </td>
        <td class="table_w2" align="center" width="10%">省份地区：</td>
        <td class="table_w2"  width="30%"><div style="width:100%"><div>&nbsp;
            <select id="province" dojoType="dijit.form.FilteringSelect" style="width:135px;" onchange="client_qy_o_change_province();">
              <option value="ALL">全部</option>
              <s:iterator value="%{getProvinces()}" status="stat">
              <option value="<s:property value="code" />" ><s:property value="name" /></option>
              </s:iterator>
            </select></div>
            <div id="qy_region"><s:include value="_changeprovince.jsp"/></div></div>
        </td>
      </tr> 
      <tr>
         <td class="table_w1" align="center" width="10%">通道信息：</td>
         <td class="table_w2" height="<s:property value="(spinfos.size()>1?2:1)*25"/>" width="17%"><div>&nbsp;
             <select id="spid" dojoType="dijit.form.FilteringSelect" style="width:135px;" onchange="client_qy_o_change_sp();">
               <option value="-2">全部</option>
               <s:iterator value="spinfos" status="stat">
               <option value="<s:property value="id" />" ><s:property value="spName" /></option>
               </s:iterator>
             </select></div>
             <div id="qy_spcodes"><s:include value="_changesp.jsp"/></div>
         </td>
        <td class="table_w2" align="center" width="10%">应用信息：</td>
        <td class="table_w2"  width="30%"><div style="width:100%">&nbsp;
        	<select id="cpid" dojoType="dijit.form.FilteringSelect" style="width:135px;" onchange="client_qy_o_change_cp();">
               <option value="-1">全部</option>
               <s:iterator value="cpinfos" status="stat">
               <option value="<s:property value="id" />" ><s:property value="shortName" /></option>
               </s:iterator>
             </select></div>
            <div id="qy_cpappinfo_div"><s:include value="_changecp.jsp"/></div>
        </td>
      </tr>
      <tr> 
        <td colspan="6" background="images/table_bom_bg.jpg">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_bom_left.jpg" width="20" height="15"></td>
            <td></td>
            <td align="right"><img src="images/table_bom_right.jpg" width="20" height="15"></td>
          </tr>
          </table>
        </td>
      </tr>
    </table>  
  </td>
  <td width="5"></td>
  </tr>
  </table>
  <div id="qy_data"></div> 